package pta;/**
 * @author： li
 * @date： 2022-03-31 19:33
 * @version 1.0
 */
import java.util.*;
public class 奇偶分家 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n =sc.nextInt();
        int count_j=0;
        int count_o=0;
        while(n>0){
            int x= sc.nextInt();
            if((x&1)==1)
                count_j++;
            else
                count_o++;
            n--;
        }
        System.out.println(count_j+" "+count_o);
    }
}
